package com.jdj.framework.core.exception;

/**
 * 业务逻辑异常
 * @author caijinbang
 * @date 2019-04-13 12:40
 */
public class BusinessException extends RuntimeException {

    private static final long serialVersionUID = -7993917493421507889L;

    /**
     * 异常编码
     */
    private String code;

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public BusinessException() {
        super();
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(String message, Throwable cause, String code) {
        super(message, cause);
        this.code = code;
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }
}
